#define _CRT_SECURE_NO_WARNINGS	

#include<stdio.h>
#include<stdlib.h>

int main()
{
    int n;
    int a, b, c;
    scanf("%d", &n);
    scanf("%d%d%d", &a, &b, &c);
    int g1 = abs(a - n);
    int g2 = abs(b - n);
    int g3 = abs(c - n);
    int min = g1;
    int dex = a;
    if (g2 < min)
    {
        min = g2;
        dex = b;
    }
    if (g3 < min)
    {
        min = g3;
        dex = c;
    }
    int max = (g1 > g2) ? g1 : g2;
    max = (max > g3) ? max : g3;
    int mid = g1 + g2 + g3 - min - max;
    if (mid == min || mid == max)
        printf("no winner\n");
    else
        printf("%d %d", dex, min);
    return 0;
}